//
//  EFBFastestMirrorTests.m
//  EFBFrameworkProject
//
//  Created by 徐 洋 on 13-9-11.
//  Copyright (c) 2013年 ADCC. All rights reserved.
//

#import "EFBFastestMirrorTests.h"

#import "EFBFastestMirror.h"

@implementation EFBFastestMirrorTests

- (void)setUp
{
    [super setUp];
    
    // Set-up code here.
}

- (void)tearDown
{
    // Tear-down code here.
    
    [super tearDown];
}

- (void)testMirrorList
{
//    STFail(@"Unit tests are not implemented yet in EFBFrameworkTests");
    NSArray *mirrors = @[@"http://www.sina.com.cn",
                         @"https://efb.hnair.com",
                         @"https://192.168.243.238",
                         @"ftp://192.168.243.230",
                         @"https://10.11.0.234"
                         ];
    EFBFastestMirror *fm = [[EFBFastestMirror alloc] initWithMirrors:mirrors];
    fm.timeout = 10.0f;
    
    NSArray * sorted = [fm mirrorList:0];
    
    NSLog(@"result: %@\n", sorted);
}

@end
